package study;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TestMaxValueAddOne {
    public static void main(String[] args) throws ParseException {
        int i = 5;
        switch (i) {
            default:
                System.out.println("default");
            case 0:
                System.out.println(0);
                break;
            case 1:
                System.out.println(1);
                break;
            case 2:
                System.out.println(2);
                break;
        }
        DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String s = sdf.format(new Date());
        System.out.println(s);

        DateFormat  sdf1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        String s1 = "2019-10-31 22:53:10";
        Date date = sdf1.parse(s1);
        System.out.println(date);

        System.out.println('a'+1);
        short s2 = 1; s2 = (short) (s2 + (short)1);
        System.out.println(s2);

        String s3="1234";
        int s4=Integer.parseInt(s3);
        System.out.println(s4);

        Integer s5=123;
        String s6=String.valueOf(s5);
        System.out.println(s6);



    }
}